Namespace Entities

    Public Class Interview
        Implements IDomainEntity

        Protected Sub New()

        End Sub

        Public Sub New(ByVal id As Guid, ByVal searchRequest As SearchRequest, ByVal dateTime As DateTime, _
                       ByVal candidate As Candidate, ByVal room As Room, ByVal comments As String)

            Dim cachedDateTime As DateTime = System.DateTime.Now

            Me.Id = id
            Me.SearchRequest = searchRequest
            Me.DateTime = dateTime
            Me.Candidate = candidate
            Me.Room = room
            Me.Comments = comments
            Me.CreatedDate = cachedDateTime
            Me.LastModified = cachedDateTime

        End Sub

        Public Sub New(ByVal searchRequest As SearchRequest, ByVal dateTime As DateTime, ByVal candidate As Candidate, _
                       ByVal room As Room, ByVal comments As String)

            Me.New(Guid.NewGuid(), searchRequest, dateTime, candidate, room, comments)

        End Sub

        Private _id As Guid
        Public Overridable Property Id() As System.Guid Implements IDomainEntity.Id
            Get
                Return _id
            End Get
            Set(ByVal value As System.Guid)
                _id = value
            End Set
        End Property

        Private _searchRequest As SearchRequest
        Public Overridable Property SearchRequest() As SearchRequest
            Get
                Return _searchRequest
            End Get
            Set(ByVal value As SearchRequest)
                _searchRequest = value
            End Set
        End Property

        Private _dateTime As DateTime
        Public Overridable Property DateTime() As DateTime
            Get
                Return _dateTime
            End Get
            Set(ByVal value As DateTime)
                _dateTime = value
            End Set
        End Property

        Private _candidate As Candidate
        Public Overridable Property Candidate() As Candidate
            Get
                Return _candidate
            End Get
            Set(ByVal value As Candidate)
                _candidate = value
            End Set
        End Property

        Private _room As Room
        Public Overridable Property Room() As Room
            Get
                Return _room
            End Get
            Set(ByVal value As Room)
                _room = value
            End Set
        End Property

        Private _comments As String = String.Empty
        Public Overridable Property Comments() As String
            Get
                Return _comments
            End Get
            Set(ByVal value As String)
                _comments = value
            End Set
        End Property

        Private _createdDate As DateTime

        Public Overridable Property CreatedDate() As Date Implements IDomainEntity.CreatedDate
            Get
                Return _createdDate
            End Get
            Set(ByVal value As Date)
                _createdDate = value
            End Set
        End Property

        Private _lastModified As DateTime
        Public Overridable Property LastModified() As Date Implements IDomainEntity.LastModified
            Get
                Return _lastModified
            End Get
            Set(ByVal value As Date)
                _lastModified = value
            End Set
        End Property

        Private _isDeleted As Boolean
        Public Overridable Property IsDeleted() As Boolean Implements IDomainEntity.IsDeleted
            Get
                Return _isDeleted
            End Get
            Set(ByVal value As Boolean)
                _isDeleted = value
            End Set
        End Property

        Public Overridable Sub Validate() Implements IValidableEntity.Validate

        End Sub

        Public Overridable Sub ValidateDelete() Implements IValidableEntity.ValidateDelete

        End Sub
    End Class

End Namespace
